package org.sakaiproject.jsfdemo.tool.jsf;

import javax.faces.component.html.HtmlDataTable;

import bk.Question;
import bk.Section;

public class editPage {
	Section qSection= new Section();
	boolean editing = false;
	Question editingQ;
	HtmlDataTable myDT;

	public Section getqSection() {
		return qSection;
	}

	public void setqSection(Section qSection) {
		this.qSection = qSection;
	}

	public boolean isEditing() {
		return editing;
	}

	public void setEditing(boolean editing) {
		this.editing = editing;
	}

	public Question getEditingQ() {
		return editingQ;
	}

	public void setEditingQ(Question editingQ) {
		this.editingQ = editingQ;
	}
	public String editThisQ(){
		editingQ = (Question) myDT.getRowData();
		editing=true;
		return "editPage";
	}
	public String doneEditing(){
		editing =false;
		return "editPage";
	}
	public String addChoice(){
		editingQ.addAnswer();
		return "editPage";
	}	
	public HtmlDataTable getMyDT() {
		return myDT;
	}

	public void setMyDT(HtmlDataTable myDT) {
		this.myDT = myDT;
	}
	
}
